package demo5;

public class AnimalsTest {
    public static void main(String[] args) {
        System.out.println("------狗狗-------");
        dog d=new dog("小白",1);
        System.out.println(d.getName()+" "+d.getAge());
        d.eat();
        d.swim();
        System.out.println("------蛙蛙------");
        frog f=new frog("小青",2);
        System.out.println(f.getName()+" "+f.getAge());
        f.eat();
        f.swim();
        System.out.println("-----兔兔-------");
        rabbit r=new rabbit("兔兔",1);
        System.out.println(r.getName()+" "+r.getAge());
        r.eat();
    }
}
